package main

import (
	"fmt"
	"runtime"
)

func main()  {
	num := runtime.NumCPU()
	fmt.Println("cpu数目：",num)

	//设置使用多少个cpu
	runtime.GOMAXPROCS(num -1)
}

